const getters = {
  lang: (state) => state.user.lang,
  orgId: (state) => state.user.orgId,
  orgInfo: (state) => state.user.orgInfo,
  isLogin: (state) => state.user.orgId && state.user.token,
  configInfo: (state) => state.user.configInfo,
  aiConfig: (state) => state.user.aiConfig,
  userInfo: (state) => state.user.userInfo,
  token: (state) => state.user.token,
  clipRole: (state) => state.user.clipRole,
  // shotstack
  dragStatus: (state) => state.shotstack.dragStatus,
  expectedVideo: (state) => state.shotstack.expectedVideo,
  libraryId: (state) => state.shotstack.libraryId,
  clipJSON: (state) => state.shotstack.clipJSON,
  crtShowVideo: (state) => state.shotstack.crtShowVideo,
  crtShowVideoList: (state) => state.shotstack.crtShowVideoList,
  reloadResource: (state) => state.shotstack.reloadResource,
  versionInfo: (state) => state.shotstack.versionInfo,
  selectTemplate: (state) => state.shotstack.selectTemplate,
  dubbingAndSubtitles: (state) => state.shotstack.DubbingAndSubtitles,
  intelligentSplittingData: (state) => state.shotstack.intelligentSplittingData,
  extractTextData: (state) => state.shotstack.extractTextData,
  applicationMaterialData: (state) => state.shotstack.applicationMaterialData,

  pageData: (state) => state.shotstack.pageData,

  // 套餐是否过期
  isVersionExpired: (state) => {
    const expireTime = state.shotstack.versionInfo.expire_time;
    if (expireTime) {
      const expireDate = new Date(`${expireTime} 23:59:59`);
      const currentDate = new Date();
      return currentDate > expireDate;
    }
  },
};

export default getters;
